package jvm;

/**
 * @author ：黄淼淳
 * @date ：2021/12/17 18:16
 * @description：虚拟机内存
 */
public class Demo {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        long Max_Memory = runtime.maxMemory();
        long Total_Memory = runtime.totalMemory();
        System.out.println("-Xmx:Max_Memory = "+Max_Memory+"byte\t\t"+Max_Memory/(double)1024/1024+"MB");
        System.out.println("-Xms:Total_Memory = "+Total_Memory+"byte\t\t"+Total_Memory/(double)1024/1024+"MB");
    }
}
